﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using AG.Editor.Core;

namespace AG.Editor.TextureFontUI.Controls
{
    public partial class AGTextureFontCharRectBorder : UserControl
    {
        public Image _texture;
        public AGTextureFontChar _fontChar;

        public AGTextureFontCharRectBorder()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            e.Graphics.DrawImage(_texture, 0, 0, Width, Height);
            if (_fontChar != null)
            {
                e.Graphics.DrawRectangle(Pens.Red, _fontChar.Left, _fontChar.Top, _fontChar.Width, _fontChar.Height);
            }
        }
    }
}
